package com.ihr360.expr.core;

import com.ihr360.expr.ExprException;

import java.math.BigDecimal;

public abstract class ExprNumber extends Expr {
    protected ExprNumber(ExprType type) {
        super(type, false);
    }

    @Override
    public void validate() throws ExprException {
    }

    public boolean booleanValue() {
        return intValue() != 0;
    }

    public BigDecimal bigDecimal() {
        return BigDecimal.ZERO;
    }

    public abstract int intValue();

    public abstract double doubleValue();


}